package cn.seu.together.utils;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by corvo on 2/15/17.
 *
 * 自定义的JSONTemplate, 每次请求时状态码单独指定, 不使用HTTP状态码
 */
public class ResponseTemplate<T>{

    private T data;
    private int code;

    public ResponseTemplate(T data, int code) {
        this.data = data;
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
